package config

type ServerConfig struct {
	Name       string     `mapstructure:"name" json:"name" yaml:"name"`
	MysqlInfo  MysqlInfo  `mapstructure:"mysql" json:"mysql" yaml:"mysql"`
	RedisInfo  RedisInfo  `mapstructure:"redis" json:"redis" yaml:"redis"`
	NacosInfo  NacosInfo  `mapstructure:"nacos" json:"nacos" yaml:"nacos"`
	ServerList ServerList `mapstructure:"servers" json:"servers" yaml:"servers"`
}

type ServerList struct {
	GoodsServerName string `mapstructure:"goodsServerName" json:"goodsServerName"  yaml:"goodsServerName"`
	StockServerName string `mapstructure:"stockServerName" json:"stockServerName"  yaml:"stockServerName"`
}

type NacosInfo struct {
	Host      string `mapstructure:"host" json:"host"  yaml:"host"`
	Port      uint64 `mapstructure:"port" json:"port"  yaml:"port"`
	Namespace string `mapstructure:"namespace" json:"namespace"  yaml:"namespace"`
	GroupId   string `mapstructure:"group" json:"group"  yaml:"group"`
	User      string `mapstructure:"user" json:"user"  yaml:"user"`
	Password  string `mapstructure:"password" json:"password"  yaml:"password"`
	Dataid    string `mapstructure:"dataid" json:"dataid"  yaml:"dataid"`
}

type MysqlInfo struct {
	Host     string `mapstructure:"host" json:"host" yaml:"host"`
	Port     uint64 `mapstructure:"port" json:"port" yaml:"port"`
	Db       string `mapstructure:"db" json:"db" yaml:"db""`
	User     string `mapstructure:"user" json:"user" yaml:"user"`
	Password string `mapstructure:"password" json:"password" yaml:"password"`
}

type RedisInfo struct {
	Host     string `mapstructure:"host" json:"host" yaml:"host"`
	Port     uint64 `mapstructure:"port" json:"port" yaml:"port"`
	Db       string `mapstructure:"db" json:"db" yaml:"db"`
	Password string `mapstructure:"password" json:"password" yaml:"password"`
}
